package com.realife.eson.common.util.common;

import com.realife.eson.common.asserts.AssertNP;
import lombok.extern.slf4j.Slf4j;

import java.util.Arrays;

/**
 * @version V1.0
 * @author: guangcheng
 * @date: 2022/4/10 2:45
 * @description:
 */
@Slf4j
public class ShowUtil {
    private ShowUtil() {
    }


    public static String show2dimArr(int[][] arr) {
        StringBuilder str = new StringBuilder();
        for (int[] t : arr) {
            str.append(Arrays.toString(t));
            log.info("[**===================> {} **]", Arrays.toString(t));
        }
        if (AssertNP.legalParams(str)) {
            return str.toString();
        }
        return "non";
    }


    public static void main(String[] args) {
        int size = 1000;

        double p = 9900.0 / (size * (size - 1)) + size * (size - 1) / 11100000.0;
        //√
//        double p = 99900.0 / (size * (size - 1)) + size * (size - 1) / 11110000000.0;
//        double p = 1000000.0 / (size * (size - 1));
        System.out.println(p);
    }
}

